<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>07_相对定位</title>
  <style>
    .fu {
      background-color: #f00;
    }
    .fu>div {
      width: 100px;
      height: 100px;
    }
    .z1 {
      background-color: yellow;
      position: relative;
      z-index: 10;
    }
    .z2 {
      /*相对定位 不会脱离文档流*/
      position: relative;
      bottom: 20px;
      right: 20px;
      /*设置层级高度*/
      z-index: 15;
      background-color: green;
    }
    .z3 {
      background-color: cornflowerblue;
    }

  </style>
</head>
<body>
<div class="fu">
  <div class="z1"></div>
  <div class="z2"></div>
  <div class="z3"></div>
</div>
</body>
</html>